package com.da.springtest.ioc.create;

/**
 * @author chenlida
 * @date 2020/6/13 21:58
 * @description
 */
public class UserFactory {
    public UserModel buildUser1() {
        System.out.println("----------------------1");
        UserModel userModel = new UserModel();
        userModel.setName("bean实例方法创建的对象!");
        return userModel;
    }

    public UserModel buildUser2(String name, int age) {
        System.out.println("----------------------2");
        return new UserModel(name, age);
    }
}